package cn.yunyichina.provider.reservation.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.provider.reservation.dao.ProvinceDao;
import cn.yunyichina.provider.reservation.entity.Province;
import cn.yunyichina.provider.reservation.service.ProvinceService;

import com.alibaba.fastjson.JSON;

/**
 * Created by Lullaby on 2016/8/24.
 */
@Service
public class ProvinceServiceImpl implements ProvinceService {

    @Resource
    private ProvinceDao provinceDao;

    public Response getProvince() {
        List<Province> provinces = provinceDao.select();
        Response response = new Response();
        response.setResult(JSON.toJSONString(provinces));
        return response;
    }

}
